:root {
  --primary-color: #60a5fa;
  --secondary-color: #93c5fd;
  --text-color: #e5e7eb;
  --bg-color: #111827;
  --card-bg: #1f2937;
  --border-radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25),
    0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--bg-color);
  padding: 0px 20px 0px 20px;
  max-width: 800px;
  margin: 0 auto;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  margin-bottom: 5px;
  text-align: center;
}

header > div {
  font-size: 2rem;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  margin: 0rem;
}

#mainlink {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

#mainlink:hover {
  color: var(--secondary-color);
}

.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.demo {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 16px;
  transition: transform 0.2s;
}

.demo:hover {
  transform: translateY(-2px);
}

.flag {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flex {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.bar {
  flex: 1 0 auto;
  min-width: 120px;
}

.bar a {
  display: block;
  padding: 12px;
  background-color: #374151;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-color);
  text-align: center;
  transition: all 0.2s;
}

.bar a:hover {
  background-color: #4b5563;
  color: var(--primary-color);
}

.bar a strong {
  color: var(--primary-color);
}

footer {
  margin-top: 0px;
  text-align: center;
  padding: 5px;
  color: #64748b;
}

#beian {
  font-size: 14px;
}

.div_center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.div_center .item {
  white-space: nowrap;
}

.div_center a {
  color: #64748b;
  text-decoration: none;
}

.div_center a:hover {
  text-decoration: underline;
}

/* 响应式设计 */
@media screen and (width<768px) {
  /*让bar在flex中每行放两个，如果一行只有一个，就放48%*/
  .bar {
    flex: 0 0 48%;
  }
}
